import { http } from '@/common/service/service.js' 

// 话题列表
export function apiGetTopicList(params) {
  return http.get('/ieltsRecallTopic/getAllTopics', {
		params
	})
}

// 根据经纬度获取城市
export function apiGetCityNameByXY(params) {
  return http.get('/ieltsRecallExamCenters/getCityNameByXY', {
		params
	})
}

// 获取所有城市名字
export function apiGetAllCityName(params) {
  return http.get('/ieltsRecallExamCenters/getAllCityName', {
		params
	})
}

// 获取城市下所有考点学校
export function apiGetAllCentersByCity(params) {
  return http.get('/ieltsRecallExamCenters/getAllCentersByCity', {
		params
	})
}

// 搜索考点
export function apiSearchCenters(params) {
  return http.get('/ieltsRecallExamCenters/searchCenters', {
		params
	})
}

// 获取笔试可考试日期
export function apiGetTimes(params) {
  return http.get('/ieltsRecallExamSchedule/getAdjacentDate', {
		params
	})
}

// 保存笔试机试回忆
export function apiWriteSave(query) {
  return http.post('/ieltsRecallPublish/writeSave', query)
}

// 保存口语回忆
export function apiSpeakSave(query) {
  return http.post('/ieltsRecallPublish/speakSave', query)
}

// 获取口语回忆列表
export function apiGetSpeakList(query) {
	return http.post('/ieltsRecallPublish/speakList', query)
}

// 获取笔试机试回忆列表
export function apiGetWriteList(params) {
	return http.post('/ieltsRecallPublish/writeList', params)
}

// 获取口语考试回忆详情
export function apiSpeakDetail(params) {
	return http.get('/ieltsRecallPublish/speakDetail', {
		params
	})
}

// 获取笔试考试回忆详情
export function apiWriteDetail(params) {
	return http.get('/ieltsRecallPublish/writeDetail', {
		params
	})
}

// 评论列表
export function apiListComment(params) {
	return http.get('/ieltsRecallSocial/listComment', {
		params
	})
}

// 回复列表
export function apiListSubComment(params) {
	return http.get('/ieltsRecallSocial/listSubComment', {
		params
	})
}

// 新增评论回复
export function apiAddComment(params) {
	return http.post('/ieltsRecallSocial/addComment', params)
}

// 删除评论回复
export function apiRemoveComment(params) {
	return http.post(`/ieltsRecallSocial/removeComment?id=${params.id}`)
}

// 点赞
export function apiLike(params) {
	return http.post('/ieltsRecallSocial/like', params)
}

// 获取考试回忆评论数
export function apiCountComment(params) {
	return http.get('/ieltsRecallSocial/countComment', {
		params
	})
}

// 增加转发量
export function apiAddShares(params) {
	return http.post(`/ieltsRecallSocial/addShares/${params.id}`)
}